<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.org/rich"
	template="../include/template.xhtml">
	
	<ui:define name="pageTitle">
		<h:outputText value="注册" />
	</ui:define>
	
	<ui:define name="content">

		<style type="text/css">
<!--
.headerClass {
	border: 0px #c0d5e6 solid;
}
-->
</style>
		<br />
		<h:outputText value="创建帐户" styleClass="strong" />
		
		<rich:panel header="Ctask帐户的必要信息" headerClass="headerClass">

			<br />
			<br />
			<h:form>
				<h:panelGrid columns="2" style="width:80%">
					<h:outputText value="您当前的电子邮件地址:" styleClass="strong" />
					<s:decorate id="emailDecorate"
						template="../include/passport/inputField.xhtml">
						<h:inputText value="#{user.email}" style="width:70%"
							required="true">
							<a:support event="onblur" reRender="emailDecorate" />
						</h:inputText>
						<ui:define name="remark">例如 myname@example.com，该电子邮件地址将作为您帐户的登录名。</ui:define>
					</s:decorate>
					<h:outputText value="设定密码: " styleClass="strong" />
					<s:decorate id="passwordDecorate"
						template="../include/passport/inputField.xhtml">
						<h:inputSecret value="#{user.password}" redisplay="true"
							style="width:70%" required="true">
							<a:support event="onblur" reRender="passwordDecorate" />
						</h:inputSecret>
						<ui:define name="remark">长度必须最少包含4个字符。</ui:define>
					</s:decorate>
					<h:outputText value="再次输入密码： " styleClass="strong" />
					<s:decorate id="confirmDecorate"
						template="../include/passport/inputField.xhtml">
						<h:inputSecret id="verify" value="#{user.passwordConfirm}"
							redisplay="true" style="width:70%" required="true">
							<a:support event="onblur" reRender="confirmDecorate" />
						</h:inputSecret>
						<ui:define name="remark"></ui:define>
					</s:decorate>
					<h:outputText value="昵称:" styleClass="strong" />
					<s:decorate id="nickNameDecorate"
						template="../include/passport/inputField.xhtml">
						<h:inputText value="#{user.nickName}" style="width:70%"
							required="true">
							<a:support event="onblur" reRender="nickNameDecorate" />
						</h:inputText>
						<ui:define name="remark">在Ctask显示的名字，由3-20个字母或数字组成</ui:define>
					</s:decorate>
					<h:outputText value="验证码信息:" styleClass="strong" />
					<s:decorate id="checkCodeDecorate"
						template="../include/passport/inputField.xhtml">
						<h:inputText id="verifyCaptcha" style="width:70%"
							value="#{captcha.response}" required="true">
							<a:support event="onblur" reRender="checkCodeDecorate" />
						</h:inputText>
						<h:graphicImage id="checkCode" value="/seam/resource/captcha">
							<a:support event="onclick" reRender="checkCode" />
						</h:graphicImage>
						<ui:define name="remark"></ui:define>
					</s:decorate>
					<h:outputText value="服务条款:" styleClass="strong" />
					<s:div
						style="border:1px solid #BBB;width: 520px;height:200px;overflow: auto;">
						<ui:include src="../include/passport/contract.html" />
					</s:div>

				</h:panelGrid>

				<br />
				<a:commandButton value="我接受;创建我的帐户. "
					action="#{registerAction.addUser(user)}" />
			</h:form>
		</rich:panel>

	</ui:define>
</ui:composition>
